#!/usr/bin/env bash
git init
mkdir -p autoload
mkdir -p bundle

#Vim Addon Management Tool
curl -Sso autoload/pathogen.vim \
        https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
git submodule add http://github.com/tpope/vim-fugitive.git bundle/fugitive       #Git wrapper

#Automatic generate code block, refer to https://github.com/garbas/vim-snipmate
#tlib for tlib#input#List which provides the excellent filterable list selection view (and more).
git submodule add https://github.com/tomtom/tlib_vim.git bundle/tlib_vim           #vim-snipmate's dependency
#vim-addon-mw-utils providing the implementation for caching parsed .snippets files.
git submodule add https://github.com/MarcWeber/vim-addon-mw-utils.git bundle/vim-addon-mw-utils #vim-snipmate's dependency
git submodule add https://github.com/garbas/vim-snipmate.git bundle/vim-snipmate   #Automatic generate code
git submodule add https://github.com/honza/vim-snippets.git bundle/vim-snippets
#Automatic generate code block, refer to https://github.com/garbas/vim-snipmate

git submodule add https://github.com/tpope/vim-surround.git bundle/surround
git submodule add https://github.com/tpope/vim-git.git bundle/git
git submodule add https://github.com/ervandew/supertab.git bundle/supertab
git submodule add https://github.com/sontek/minibufexpl.vim.git bundle/minibufexpl  #Show buffer at the same time
git submodule add https://github.com/wincent/Command-T.git bundle/command-t
git submodule add git://github.com/kevinw/pyflakes-vim.git bundle/pyflakes-vim      #Check Python code on the fly
git submodule add https://github.com/mileszs/ack.vim.git bundle/ack
git submodule add https://github.com/sjl/gundo.vim.git bundle/gundo
git submodule add https://github.com/fs111/pydoc.vim.git bundle/pydoc
git submodule add https://github.com/vim-scripts/pep8.git bundle/pep8               #Check Python code according PEP8
git submodule add https://github.com/alfredodeza/pytest.vim.git bundle/py.test
git submodule add https://github.com/reinh/vim-makegreen bundle/makegreen
git submodule add https://github.com/vim-scripts/TaskList.vim.git bundle/tasklist   #Get a list TODO and FIXME
git submodule add https://github.com/vim-scripts/The-NERD-tree.git bundle/nerdtree  #File Browser
git submodule add https://github.com/scrooloose/nerdcommenter bundle/nerdcommente  #Commen shotcut ,cc ,cu

#Ropevim is a plugin for performing python refactorings in vim, in fact, it can do code completion
git submodule add https://github.com/sontek/rope-vim.git bundle/ropevim

#Surround.vim is all about "surroundings": parentheses, brackets, quotes, XML tags, and more
git submodule add git://github.com/tpope/vim-surround.git bundle/vim-surround

git submodule init
git submodule update
git submodule foreach git submodule init
git submodule foreach git submodule update
